// @flow
import * as React from 'react';
import {handleLog} from './tools';

type Props = {
  name: string,
  age?: number,
};

function MyComponent({name, age}: Props) {
  handleLog();

  return (
    <div>
      <h1>Hello, {name}</h1>
      {age && <p>You are {age} years old</p>}
    </div>
  );
}

export default MyComponent;
